<%@ page contentType="text/html;charset=iso8859_1" language="java" %>

<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/struts-nested.tld" prefix="nested" %>

<html:html locale="true">
<head>
	<title><bean:message key="common.relogin" /></title>
	<link rel="stylesheet" href="../style/default_aux.css">
	<link rel="stylesheet" href="../style/pp.css">
</head>
<body onload="oninit();">
	<script src="../script/overlib.js" language="JavaScript"></script>
	<script src="../script/style.js" language="JavaScript"></script>
	<script src="../script/windows.js" language="JavaScript"></script>
	<table cellspacing="0" class="filledframe">
		<tr>
			<td nowrap="" class="clientframe">
				<table id="oHelp" class="helper" >
					<tr>
						<td width="200" class="label">&nbsp;</td>
						<td class="help"><input type="button" class="button" title="<bean:message key="common.help.title" />" onclick="help('help.report.schd');" value="<bean:message key="common.help" />" ></td>
					</tr>
				</table>
				
				<input type="hidden" name="pageUrl" value="<html:rewrite action="/report/ReportSchdList" />" />
				<div class="listtitle"><bean:message key="common.relogin" /></div>
				<div class="subtitle" style="width: 560px; "><span class="error"></span></div>

				<table width="500" height="150" cellspacing="0" class="formpanel">
					<tr><td class="toppad">&nbsp;</td></tr>
					<tr><td class="input"><table cellspacing="0"><tr>
						<td nowrap class="label"><bean:message key="common.userid" />:</td>
						<td nowrap ><input type="text" id="oUsername" size="20" maxlength="16" class="text" onkeydown="return focusMove()" onfocus="onFieldFocus()" onblur="onFieldBlur()" tabindex="101" ></td>
					</tr></table></td></tr>
					<tr><td class="input"><table cellspacing="0"><tr>
						<td nowrap class="label"><bean:message key="common.password" />:</td>
						<td nowrap ><input type="password" id="oPassword" size="20" maxlength="16" class="text" onfocus="onFieldFocus()" onblur="onFieldBlur()" tabindex="102" ></td>
					</tr></table></td></tr>
					<tr><td class="line"><table cellspacing="0"><tr>
						<td nowrap class="label"><span class="error" id="oErrMsg"></span></td>
					</tr></table></td></tr>
					<tr><td class="bottompad">&nbsp;</td></tr>
				</table>

				<table width="500" class="formpanelbar">
					<tr>
						<td align="right" nowrap="">
							<input type="button" tabindex="1001" onclick="onLogin();" class="button" value="<bean:message key="common.login" />" ></td>
					</tr>
				</table>
			</td>
			<!-- td id="oFrame" nowrap="" class="infoframe">&nbsp;</td -->
		</tr>
	</table>
	
	<% request.setAttribute("request", request); %>
	<form action="/jsp/auth/relogin.jsp" id="oLoginForm" target="oLogonFrame">
		<input type="hidden" name="username" />
		<input type="hidden" name="password" />
		<input type="hidden" name="successCallback" value="onRetry" />
		<input type="hidden" name="failCallback" value="onFailLogin" />
	</form>
	<iframe id="oLogonFrame" style="display: none; " name="oLogonFrame" ></iframe>
	
<script language="javascript">
function oninit()
{
}
function onLogin()
{
	if (0 == oUsername.value.length)
	{
		alert("<bean:message key="logon.err.noUsername" />");
	}
	else if (0 == oPassword.length)
	{
		alert("<bean:message key="logon.err.noPassword" />");
	}
	else
	{
		oLoginForm.username.value = oUsername.value;
		oLoginForm.password.value = oPassword.value;
		oLoginForm.submit();
	}
}
function onRetry()
{
	open("<html:rewrite action="/auth/TransNavigator" />", "shortcut");
	open("/welcome.html", "_self");
}
function onFailLogin(msg)
{
	oUsername.value = "";
	oPassword.value = "";
	oErrMsg.innerText = msg;
}
</script>

</body>
</html:html>
